package exttable.view;

import exttable.testversioning.ControlNodes;

/**
 * Created by IntelliJ IDEA.
 * User: Admin
 * Date: Jul 1, 2010
 * Time: 4:40:28 PM
 * To change this template use File | Settings | File Templates.
 */
public class ViewNodes {
    private String name;
    private ControlNodes nodeType;

    public String getName() {
        return name;
    }

    public ControlNodes getNodeType() {
        return nodeType;
    }

    public static class Build implements IBuilder {
        private String name;
        private ControlNodes nodeType;

        public Build name(String name) {
            this.name = name;
            return this;
        }

        public Build nodeType(ControlNodes node) {
            this.nodeType = node;
            return this;
        }

        @Override
        public ViewNodes build() {
            return new ViewNodes(this);
        }

    }

    public ViewNodes(Build build) {
        name = build.name;
        nodeType = build.nodeType;
    }

    @Override
    public String toString() {
        return name;
    }
}
